<div id="page">
    <div id="content">
        <div class="post">
            <?php 
            if(isset($this->hot_news_list)){
                foreach($this->hot_news_list as $item){
                    
                    echo '<div class="entry">';
                    echo '<h2 class="title"><a href="default/news/detail/id/'.$item['id'].'">' . (($this->lang == "vn") ? $item['title'] : $item['title_en']) . ' </a></h2>';                      
                        echo '<div class="left-entry">';
                            echo '<a href="default/news/detail/id/'.$item['id'].'"><img src="' . $item['thumbnail_url'] . '"   alt="" /></a>';
                        echo '</div>';
                        echo '<div class="right-entry">';
                        
                        echo '<p>' . (($this->lang == "vn") ? $item['des'] : $item['des_en']) . '</p>';
                        echo '<p class="links"><a href="default/news/detail/id/'.$item['id'].'" class="more">Xem thêm</a></p>';
                        echo '</div>';
                    echo '</div>';
                    echo '<div class="clear"></div>';
                }
            }
            ?>
        </div>
    </div>
    <!-- end #content -->
    <div class="sidebar" id="rss">
        <ul>
            <li>
                <h1><a href='#'>RSS</a></h1>
                <ul>
                    <?php 
                        if(isset($this->rss)){
                            $i = 0;
                            echo "<ul>";
                            foreach($this->rss as $item){
                                 if($i > 5)
                                     continue;
                                 $titles = $item->getElementsByTagName( "title" );
                                 $title = $titles->item(0)->nodeValue;
                                 
                                 $links =  $item->getElementsByTagName( "link" );
                                 $link = $links->item(0)->nodeValue;
                                 echo "<li><a href='".$link."'>".$title."</a></li>";
                                 $i ++;
                            }
                            echo "</ul>";
                        }else{
                            echo "<li>No RSS available</li>";
                        }
                    ?>                    
                </ul>
            </li>
        </ul>
    </div>
    <div class="sidebar" id='contact'>
        <ul>
            <li>
                <h1><a href='#'>Hỗ trợ kỹ thuật</a></h1>
                <ul>
                    <li><img src='http://opi.yahoo.com/online?u=thangkhung_cuatoi&m=g&t=5'/><a href="ymsgr:thangkhung_cuatoi">Nguyễn Lê Duy</a></li>
                    <li><img src='http://opi.yahoo.com/online?u=thangkhung_cuatoi&m=g&t=5'/><a href="ymsgr:thangkhung_cuatoi">Nguyễn Lê Duy</a></li>
                    <li><img src='http://opi.yahoo.com/online?u=thangkhung_cuatoi&m=g&t=5'/><a href="ymsgr:thangkhung_cuatoi">Nguyễn Lê Duy</a></li>
                    <li><img src='http://opi.yahoo.com/online?u=thangkhung_cuatoi&m=g&t=5'/><a href="ymsgr:thangkhung_cuatoi">Nguyễn Lê Duy</a></li>
                    <li><img src='http://opi.yahoo.com/online?u=thangkhung_cuatoi&m=g&t=5'/><a href="ymsgr:thangkhung_cuatoi">Nguyễn Lê Duy</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- end #sidebar -->
    <div style="clear: both;">&nbsp;</div>
</div>
<!-- end #page --> 
<div id="featured-content">
    <?php 
        if(isset($this->news)){
            $i = 1;
            foreach ($this->news as $item){
                echo '<a href="' . $this->baseUrl."/".$this->module."/news/detail/id/".$item['id'] . '">';
                echo '<div class ="column" id="column' . $i++ . '">';
                    echo '<h2>' . (($this->lang == "vn") ? $item['title'] : $item['title_en']) . '</h2>';
                    echo '<p><img src="' . $item['thumbnail_url'] . '" width="300" height="200px" alt="" /></p>';
                    echo '<p>' . (($this->lang == "vn") ? $item['des'] : $item['des_en']) . '</p>';
                   
                echo '</div>';
                echo '</a>';
            }
            echo "<div class='clear'></div>";
        }

    ?>
</div>